package com.ylbh.modules.orderreturn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ylbh.common.pojo.orderreturn.dto.OrderReturnListDTO;
import com.ylbh.common.pojo.orderreturn.vo.OrderReturnExcelVO;
import com.ylbh.common.pojo.orderreturn.vo.OrderReturnListVO;
import com.ylbh.common.pojo.orderreturn.vo.OrderTypeByOrderNoVO;
import com.ylbh.common.pojo.orderreturn.vo.PromotionCommissionExcelVO;
import com.ylbh.modules.business.entity.ShoppingUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 商城订单返佣
 */
@Mapper
@Repository
public interface OrderReturnMapper extends BaseMapper<ShoppingUser> {

    /**
     * 商城订单返佣
     * @param orderReturnListDTO
     * @param page
     * @return
     */
    List<OrderReturnListVO> selectOrderReturnList(@Param(value = "orderReturnListDTO")OrderReturnListDTO orderReturnListDTO, Page page);

    /**
     * 导出订单返佣
     * @param type
     * @return
     */
    List<OrderReturnExcelVO> selectOrderReturnExcel(@Param(value = "type")String type, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "keywords")String keywords);

    /**
     * 查询出关联的商品名
     * @param id
     * @return
     */
    List<String> selectGoodsName(@Param(value = "id")Long id);

    /**
     * 导出商城推广佣金
     * @param type
     * @return
     */
    List<PromotionCommissionExcelVO> selectPromotionCommissionExcel(@Param(value = "type")String type, @Param(value = "startTime")String startTime, @Param(value = "endTime")String endTime, @Param(value = "keywords")String keywords);

    /**
     * 福利商城订单
     * @param orderNo
     * @return
     */
    List<OrderTypeByOrderNoVO> selectGoodsOrderTypeByOrderNo(String orderNo);

    /**
     * 联盟店线上买单
     * @param orderNo
     * @return
     */
    OrderTypeByOrderNoVO selectBusinessOrderTypeByOrderNo(String orderNo);

    /**
     * 联盟店线下买单
     * @param orderNo
     * @return
     */
    OrderTypeByOrderNoVO selectPayInfoOrderTypeByOrderNo(String orderNo);

    List<OrderTypeByOrderNoVO> selectAllOrderTypeByOrderNo(String orderNo);
}
